Is it possible to add a select statement in case or if function in SQL
select case when :A='do' then (select col1 from table1) else 'n/a' end
select if(:A='do',(select col1 from table1),'N/A');
If this is Oracle, as per your tag, then neither of your queries are valid as they're not actually selecting from a table.
Perhaps what you're after is something like:
select case when :A='do' then col1 else 'n/a' end col from table1;
Or maybe you're after something like:
select col1 from table1 where :A != 'do' union all select 'N/A' col1 from dual where :A = 'do';
You didn't provide any example data, so I'm not sure if what you're trying to do is make all the values of col1 appear as 'N/A' if the bind variable is "do" or whether you only want a single row containing 'N/A'.