Вы можете попробовать это на SQL SERVER:
CREATE TABLE TestPvt (Year varchar(32), January int, february int,
March int);
GO
INSERT INTO TestPvt VALUES ('Actual 2019',700,220,456);
INSERT INTO TestPvt VALUES ('Budget 2019',200,752,500);
SELECT Year, Month, Amount
FROM
(SELECT Year, January, february, March
FROM TestPvt) p
UNPIVOT
(Amount FOR Month IN
(January, february, March)
)AS unpvt;
Результат:
Year Month Amount
Actual 2019 January 700
Actual 2019 february 220
Actual 2019 March 456
Budget 2019 January 200
Budget 2019 february 752
Budget 2019 March 500