Named query if else

Hello
Is it possible to use If else in named queries?

Named queries accept the same SQL syntax that legacy queries accept. Meaning, whatever syntax your database allows. Ignition doesn’t execute SQL itself.