According to me your following query is wrong.
select course, stuff((select ',' + cast(SubQry.Faculty_Code as varchar(50)) from Tb_SCh_TIme_Table As SubQry where SubQry.course = MainQry.course for XML Path('')), 1, 1,'') as Faculty_Code
from Tb_SCh_TIme_Table as MainQry where Course='PH2'
Group by MainQry.course.
It should be corrected as follows
SELECT [Date],[Course],[Session],
SUBSTRING((SELECT ','+ [Faculty_Code]
FROM [Tb_SCh_TIme_Table ] dp2
WHERE dp2.[Date] = dp1.[Date] and dp2.[Course]=dp1.[Course] and dp2.[Session]=dp1.[Session]
FOR XML PATH('')), 2, 8000) AS [Faculty_Code]
FROM [Tb_SCh_TIme_Table ] dp1
GROUP BY [Date],[Session],[Course]
Here is the complete query according to me
SELECT *
FROM (
SELECT [Date],[Course],[Session],
SUBSTRING((SELECT ','+ [Faculty_Code]
FROM [Tb_SCh_TIme_Table ] dp2
WHERE dp2.[Date] = dp1.[Date] and dp2.[Course]=dp1.[Course] and dp2.[Session]=dp1.[Session]
FOR XML PATH('')), 2, 8000) AS [Faculty_Code]
FROM [Tb_SCh_TIme_Table ] dp1
GROUP BY [Date],[Session],[Course]
) P
PIVOT (
MAX([Faculty_Code])
FOR [Session] IN ([1],[2],[3] ,[4])
) AS PVT
WHERE [Course]='PH2'
Please check and get back to me if you need any more details.