select *,if(x = 'a' and y = 'pippo',1,0) as test from tab