I have this SELECT
statement:
SELECT
ProjectId,
ProjectName,
D3 as "three month ago",
D2 as "two month ago",
D1 as "last month",
F0 as "current month",
F1 as "next month",
F2 as "next two month",
FROM
View_Year_Forcast
I want to specify the column name according to the current month.
I have a function get_month_name
that gets the month symbol like (d1,d2,d3,f0..) and return a string that represent the month name in Hebrew.
What is the best way to solve the problem?
Just for the record I am trying to do this in a stored procedure in SQL Server