you can use PIVOT for the same
WITH your_table AS
(SELECT * FROM
(VALUES
(12402223,171906,'Quality And Reliability Engineering',1,4),
(12402223,171906,'Quality And Reliability Engineering',2,10),
(12402223,171906,'Quality And Reliability Engineering',3,11),
(12402223,171906,'Quality And Reliability Engineering',4,5),
(12402223,171906,'Quality And Reliability Engineering',5,9),
(14124223,170903,'Power System Protection',1,3),
(14124223,170903,'Power...