質問するのが苦手なので、欲しいものの例を挙げます。
if i = 1 and xi = 0 then
select a,b,c,d,e,f,g where z = 1
elseif i=0 and xi = 1 then
select a,c,f,h,l,n where w = var
elseif i=1 and xi=1 then
select a,b,c,d,e,f,g, where z = 1
union all
select a,c,f,h,l,n where w = var
end if
列が等しくなく、両方に一意の条件がある場合、2 つの select ステートメントを結合するにはどうすればよいですか?