ok here's the solution

You can write a select statment into a decode functions..

Select e.empno,e.ename,e.sal,decode(e.deptno,10,(select
decode(f.deptno,0,'true',1,'false',null) from emp f where e.empno=f.empno),null) from emp e.

I am performing the check for deptno you can accordingly substitute your values and check.. I hope this will help.. In case if it does not then let me know.