You can use Replace (Colors, ' 1', ' #1')
Command to convert digit 1 to #1. and must use Replace command for each digits. In other word your query must be write as a following:
SELECT Member_Id, LTRIM(REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(' '+Colors,' 1',' #1')
,' 2',' #2')
,' 3', ' #3')
,' 4',' #4')
,' 5',' #5')
,' 6',' #6')
,' 7',' #7')
,' 8',' #8')
,' 9',' #9')) AS Colors
From YourTable
Another method:
CREATE FUNCTION dbo.f(@T NVARCHAR(100))
RETURNS NVARCHAR(100)
AS BEGIN
DECLARE @R NVARCHAR(100)='',
@IsDigit BIT = 0,
@Index INT = 1
WHILE @Index<=LEN(@T)BEGIN
IF (SUBSTRING(@T,@Index,1) IN ('1','2','3','4','5','6','7','8','9') AND @IsDigit = 0) BEGIN
SET @R = @R + '#'+SUBSTRING(@T,@Index,1)
SET @IsDigit = 1
END ELSE BEGIN
SET @R = @R + SUBSTRING(@T,@Index,1)
SET @IsDigit = 0
END
SET @Index = @Index + 1
END
RETURN @R
END
Select Member_ID, dbo.f(Colors)
From YourTable