俩个无关的表相连接 判断取表1或者表2
select m as t1,n as t2 from a where 1=1
union all
select q as t1,w as t2 from b where 1=2
===================
思路:----- 判断逻辑写在where后面,根据【参数值】执行对应的select语句;