正直言って、私が理解していない質問を理解した場合、あなたは組合を探していますか?
select a,b,c,0 as e,0 as f, test,data from table1
union
select a,b,c,e,f, test,data from table2
union
select a,b,c,0 as e,0 as f, test,data from table3
編集 eとfを含む
edit2 各ユニオンの前にwhere句を追加する必要があります
select a,b,c,0 as e,0 as f, test,data from table1
where test= 1 and data =1 and id =0
union
select a,b,c,e,f, test,data from table2
where test= 1 and data =1 and id =0
union
select a,b,c,0 as e,0 as f, test,data from table3
where test= 1 and data =1 and id =0