In TSQL it's fairly easy:
WITH CTE_Tally AS
(
SELECT TOP 100 number FROM MASTER.dbo.spt_values
WHERE type = 'P'
AND number > 0
)
SELECT
number
,week_day = CASE WHEN (number % 7) = 0
THEN 7
ELSE (number % 7)
END
FROM CTE_Tally
ORDER BY number
You can mimick this in a derived column by using the build-in SSIS functions.