Scenario:We have a source table that has columns SaleQ1,SaleQ2,SaleQ3,SaleQ3 for sale amount. We want to Unpivot and produce output in given format.
Source table definition with sample data
CREATE TABLE dbo.TblSource
Insert into dbo.TblSource