You can make a pivot Select.
Try this:
SELECT SdeptDepartmentName, available_strength, A, B, C, G1, G2
FROM
(SELECT SempAtndSempMstrId, SshftShiftId, SdeptDepartmentName, available_strength
FROM tmpTable) AS p
PIVOT
(
COUNT (SempAtndSempMstrId)
FOR SshftShiftId IN
( [A], [B], [C], [G1], [G2] )
) AS pvt
tmpTable is a temporary table where You store the result from Your query.