WITH T_TEMP AS
(SELECT 'T1' AS COL, 'A' AS ITEM FROM DUAL UNION ALL
SELECT 'T2' AS COL, 'B' AS ITEM FROM DUAL UNION ALL
SELECT 'T3' AS COL, 'C' AS ITEM FROM DUAL UNION ALL
SELECT 'T4' AS COL, 'D' AS ITEM FROM DUAL
)
SELECT MAX(DECODE(COL, 'T1',ITEM)) AS T1
,MAX(DECODE(COL, 'T2',ITEM)) AS T2
,MAX(DECODE(COL, 'T3',ITEM)) AS T3
,MAX(DECODE(COL, 'T4',ITEM)) AS T4
FROM T_TEMP