convert row into column in sql
i have output as follows;
Date Session Code Course
1/14/2013 1 Cm AFF
1/14/2013 2 Cm AFF.
But i want the output as follows;
AFF (Course)
1 2 (Session)
1/14/2013 Cm Cm (Code)
i wan the above output in sql. how can i get the above output using query. how can i do.