\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
&
\begin{sideways}ABCD\end{sideways} &
\begin{sideways}EFGH\end{sideways} &
\begin{sideways}IJKL\end{sideways} \\ \hline
AA & 2 & 3 & 4 \\
BB & 2 & 3 & 4 \\
CC & 2 & 3 & 4 \\
DD & 2 & 3 & 4 \\ \hline
\end{tabular}
\caption{Tmp}
\label{tab:tmp}
\end{table}
\end{document}
How can I remove lines like in images below?

Also, how can I raise the first horizontal line a little up? The final result should be:

