This link uses DB2 as reference, but same concept can be used for SQL Server with little modifications.
This Approach is Similar to the answer provided by @mvisser
Using Sys.columns to generate the dates
Create A SQL Function to Generate the Dates
CREATE FUNCTION fn_GenerateDates
(
@StartDate DATETIME,
@EndDate DATETIME
)
RETURNS @Outputdates TABLE
(
Dates NVARCHAR(4000)
)
AS
BEGIN
INSERT INTO @Outputdates
-- Uses Sys.columns Table to Add Months to Given Startdate -----
SELECT DATENAME(MONTH,gen_date) + ' ' + CONVERT(VARCHAR(10),YEAR(gen_date)) FROM
(SELECT DATEADD(month,(ROW_NUMBER() OVER(ORDER BY name) - 1),@StartDate) gen_date FROM SYS.COLUMNS) a
WHERE gen_date between @StartDate and @EndDate
RETURN
END
Then use Select statement
SELECT t.id,gen_dates.Dates
FROM TableName t
CROSS APPLY dbo.fn_GenerateDates(t.StartDate, t.EndDate) AS gen_dates
ORDER BY t.id