Do you need your default to be 0? Could you use NULL?
If you use NULL you could use the following:
Code:
select
idcolumn,
(case when coalesce(column4, column3, column2, column1) < 0
then 0
else coalesce(column4,column3,column2,column1) end) as goodvalue
from yourtable
what this will do is return the first non null from your columns in that order.
the first part says that if none of the values are above 0 then return 0. you could change this to another value if you needed to.