Hi makumbisulaim...,
Refer below sample query.
SQL
-- CREATE Temporary Table.
CREATE TABLE #Test ([SrNo] INT, [Subject] VARCHAR(500))
-- Declare Subject and Number to be repeated.
DECLARE @Number INT = 5, @Subject VARCHAR(10) = 'READING'
-- REPEAT Subject and Number.
;WITH REPEAT ([Subject], [Counter]) AS
(
SELECT @Subject [Subject], 1
WHERE @Number > 0
UNION all
SELECT @Subject [Subject], [Counter] + 1
FROM REPEAT
WHERE [Counter] < @Number
)
-- INSERT INTO Temporary Table.
INSERT INTO #Test ([SrNo], [Subject])
SELECT [Counter], [Subject]
FROM REPEAT
-- Select From Temporary Table.
SELECT [SrNo], [Subject]
FROM #Test
-- Drop Temporary Table after Insert.
DROP TABLE #Test
Screenshot