Try a table valued function like this one:
CREATE FUNCTION GetNumberTable
(
@Prefix int
)
RETURNS
@result TABLE
(
"myColumn" int
)
AS
BEGIN
declare @start int
declare @end int
declare @counter int
SELECT @start=startcolumn,@end=endcolumn,@counter=startcolumn FROM myTable WEHRE prefixcolumn=@Prefix
WHILE @counter < @end
BEGIN
INSERT INTO @result (myColumn) VALUES (CAST(CONCAT(@Prefix,@counter) AS int))
END
RETURN
END
Note: There is some work to be done. I've only done a schematic example for you.