select decode(t.month,1,'JAN',2,'FEB',3,'MAR',4,'APR',5,'MAY',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OCT',11,'NOV',12,'DEC'),
case when (d.amount = '' OR d.amount is null) then 0 else d.amount end amount from (
select 1 month from dual
union
select 2 month from dual
UNION
select 3 ...