SELECT (select vlu from dept_1 d where dname='n' and loc='n') AS res1, (select vlu from dept_1 d where dname='y' and loc='y') AS res2;