This is how you create dynamic columns.
Because I don't have your table structure I cannot help you how to fill the temp table.
IF OBJECT_ID( 'tempdb..#temp') IS NOT NULL
BEGIN
DROP TABLE #temp
END
CREATE TABLE #temp
(
[CVRelID] INT,
[CustomerID] INT,
[VendorID] INT,
[TransactionID] INT
)
DECLARE @script VARCHAR(8000)
SET @script = 'ALTER TABLE #temp ADD '
SELECT @script = @script + QUOTENAME(SDName) + ' VARCHAR(100),'
FROM tblSupportDocuments
WHERE SDIsActive = 1
SET @script = SUBSTRING( @script, 1, LEN(@script) - 1)
PRINT @script
EXEC (@script)