sql query to compare column name to column data
The question is somewhat unclear, but I'll assume that you are trying to get the values of one particular column.  And looking at the column names of a particular table, you want a list of all columns whose name is the same as the returned value. Then something like below might be a good start.

SELECT
    T.ColumnName, -- will show the value of the column
    C.Object_name([object_id]), --will show the name of the table
    C.name -- will show the name of the column that matched the column value
FROM 
    SchemaName.TableName T
INNER JOIN  
    Sys.Columns C 
ON 
    T.ColumnName= C.name 
WHERE
    [object_id] = OBJECT_ID('SchemaName.TableName')


If you want to compare the value of the column to the column names in a different table or any tables, you simply need to change or delete the WHERE clause.