You need a case statement:
select (case when lookup = 8 then 8 else lookup end) as lookup
If lookup is a character string, you probably want:
select (case when lookup = '08' then '08' else lookup end) as lookup
If lookup is an integer, and you want to convert it to a string, then:
select (case when lookup = 8 then to_char(lookup, '00') else to_char(lookup, '00') end) as lookup
However, this would seem unnecessary for me.
source share