Here is what I understood of the requirements.
Select from a list of items out of a table and report on them in a horizontal table. The values in the table may or may not be known.
In my example I am building a single string from a select producing a horizontal contiguous string from a list of items into a variable.
Then I build a dynamic SQL statement using the new variable and including a select from my desired table. In the dynamic SQL I do a simple replace so the PIVOT is formatted correctly. This resolves the problem of not knowing what data exists in the table before hand. Pivot requires you to label your columns using the field values within which can be a challenge if the values in the table are unknown or change constantly.
DECLARE @FieldValueString VARCHAR(MAX)
SELECT @FieldValueString = Coalesce(@FieldValueString + ',', '') + cast(ssctab as varchar) from RA_sysScreen
PRINT @FieldValueString
DECLARE @sql VARCHAR(MAX)
SET @sql = 'SELECT * FROM
(SELECT ssctab FROM [RA_sysScreen])qry
PIVOT (MAX(ssctab) FOR ssctab in (['+REPLACE(@FieldValueString,',','],[')+'])) as pvt'
print @sql
EXEC(@sql)
Hope this helps. I look forward to seeing other answers on this one