I would like to pull data from two seperate columns based on the vaule for MakeFlag. So if MakeFlag = 0 I would
like the description to show but anything else I would like catalog description to show up.
DECLARE @MyVari varchar(20)
SELECT [ProductID]
,[prod].[Name]
,[ProductNumber]
,[MakeFlag]
,[FinishedGoodsFlag]
,[MyRow] = @MyVari
FROM [AdventureWorks2014].[Production].[Product] prod
INNER JOIN [Production].[ProductModel] Prodmod
ON prod.Name = Prodmod.name
WHERE Case When
[Production].[Product].[MakeFlag] = 0 Then @MyVari = [prod].[ProductModelID]
Else @MyVari = [Prodmod].[CatalogDescription]
END