Ah, didn't notice that. Then... dynamic sql constructed by the programming language executing the query?
That, the UNION idea, or pull the common stuff into the from clause and write two left joins then coalesce whichever one provided the row. In short, the OP cannot do what they thought they needed to do but hasn't really provided any info for others to make alternative suggestions.
David J.