create table tab(a int, b int)
insert tab select 1,0 union all
select 0,0 union all
select 1,1 union all
select 0,1
--select * from tab
select case when a=0 and b =0 then 0 else 1 end as col from tab
結果:
col         
----------- 
1
0
1
1