I believe I figured out the answer. The quick version is, to convert from a bitwise OR generated value, I would need to apply a bitwise AND to between each individual bit value and the bitwise OR generated value.
The way I did this was I generated a table of all possible bitwise values in my set (I actually just made a table with the first 30 bitwise values using the SQL POWER() function, because after 30 you run into arithmetic overflow) and then cross joined that table to my bitwise OR generated value and selected the bitwise AND operation between the bitwise values and my bitwise OR generated value, then filtered out where the result is 0.
SQL to create bitwise values table:
DECLARE @LoopCounter AS INT = 0
WHILE (@LoopCounter < 30)
BEGIN
SET @LoopCounter = @LoopCounter + 1
INSERT INTO BitmaskValues
SELECT @LoopCounter AS RowNumber, POWER(2, @LoopCounter) AS BitValue
END
SQL to join to my bitwise OR generated value and get my results after:
SELECT 11 AS BValue
INTO #Mask;
WITH BitwiseOperation AS
(
SELECT BV.BitValue, M.BValue, BV.BitValue & M.BValue AS BitwiseAnd
FROM BitmaskValue AS BV
CROSS JOIN #Mask AS M
)
SELECT BitValue, BValue, BitwiseAnd
FROM BitwiseOperation
WHERE BitwiseAnd <> 0