How can I do the following in SQL Server
DECLARE @Local nvarchar(20)
SET @Local = 'True'
SELECT * FROM My_Table
WHERE my_ID IN
(IF @Local = 'True'
SELECT AllIDs FROM ATable
ELSE
SELECT TeamIDs FROM TeamTable
)
Go for a union :-