I would like to convert some rows that is being extracted in my sql query into columns. Not all rows are duplicated in the result. So would like to know how can I convert rows to columns and if no specific value in the specific column, I would like to see blank value.
select Dep.ID,
Dep.Department,
L.Logo,
ISNULL(R.Room,'') AS [Room],
from vDepartment Dep
left join vLogos L on L.ID=Dep.ID
left join Room R on R.id=Dep.id
Current Data and expected result: