Aditya-313343 - Tuesday, August 15, 2017 6:36 PM
Select Id,
Max(case when Tabname = 'AB' and Approved = 1 then 'Yes' Else 'No' end) as ISABApprove ,
max(case when Tabname = 'CD' and Approved = 1 then 'Yes' Else 'No' end) as ISCDApprove,
MAx(case when Tabname = 'EF' and Approved = 1 then 'Yes' Else 'No' end) as ISEFApprove
from table1
group by ID