CREATE proc dbo.usp_selectspecificquery
@source int
AS
BEGIN
IF(@source = 1)
BEGIN
Select 1 as source, * from some_table
END
ELSE
Select 1 as source,* from some_table
union all
select 2 as source,* from some_other_table
END
exec dbo.usp_selectspecificquery 1