select
case
when
exists(
select
1
from
t_test c
where
c.
name
=
'zhangsan'
and
c.age = 23 )
then
1
else
0
end
from
dual;