Hi,
U can give breath to you will. Simply make a Stored Procedure. I'm giving the smaple query as below...
CREATE PROCEDURE mst_spJoinTableConditionally
@Condition NVARCHAR(2000)
AS
DECLARE @Table NVARCHAR(200)
SELECT @Table = CASE @Condition WHEN...