ChrisM@Work (9/2/2014)
Twin-devil: I think the OP wants to apply a row-level condition using values from table X, in which case dynamic sql won't work.The most common choice would be left joins to the two "conditional" tables with the two mutually-exclusive filter conditions applied in the left joins.
you might also be right about this Chris, actually OP didn't provide enough information and i just totally guessed that there might be a case when you need to Choose between 2 different tables but joining condition remains the same.
so its depends on OP what actually he/she is looking for.:-)