SELECT PC_COMP_CODE, \'R\', PC_RESUB_REF, DECODE(PC_SL_LDGR_CODE, \'02\', \'DR\', \'CR\'), PC_DEPT_NO DEPT, \'\', --PC_DEPT_NO,
You could use the 'CASE .. WHEN .. THEN .. ELSE .. END' syntax in SQL.