LINE_NO in format of XXXX example -> Line 10 is 0010
select
case
when length(line_no) = 1 then to_char(line_no)
when length(line_no) = 2 then '00' || line_no
when length(line_no) = 3 then '0' || line_no
end as sss
from tb_po_details