Ver originalSELECT a.nombrecampo, b.nombrecampo FROM `tablaA` a INNER JOIN tablaB b ON a.id = b.idUNION ALLSELECT a.nombrecampo, c.nombrecampo FROM `tablaA` a INNER JOIN tablaC c ON a.id = CONCAT('e',c.id)