if you use SqlServer you can use the CASE statement
Example:
select register col1 when null and then defaultval else col1 termination with tblname
where defaultval is the default value. The defaultval data type must match the col1 data type.
user36804
source share