insert into test
select 'John' as [USR] , 'john@gmail.com' as [MAIL ID], 'Mgr' as [ROLE], 'US' as [ACCESS]
union all
select 'John' as [USR] , 'john@gmail.com' as [MAIL ID], 'Mgr' as [ROLE], 'Europe' as [ACCESS]
union all
select 'John' as [USR] , 'john@gmail.com' as [MAIL ID], 'Mgr' as [ROLE], 'Asia' as [ACCESS]
union all
select 'Tony' as [USR] , 'Tony@gmail.com' as [MAIL ID], 'Mgr' as [ROLE], 'Asia' as [ACCESS]
--Original
select * from test
--Pivot
select
[USR]
,[MAIL ID]
,[ROLE]
,[US]
,[Europe]
,[Asia]
from(
select * from test ) as P pivot (