If I'm understanding your request correctly, you are looking for a query that will help you to identify when a column is in a primary key or a unique index constraint. The query below will help you to identify those columns.
SELECT
SCHEMA_NAME(tables.[schema_id]) AS [schema_name],
tables.name,
columns.name,
indexes.name
FROM sys.tables
INNER JOIN sys.columns
ON tables.[object_id] = columns.[object_id]
INNER JOIN sys.index_columns
ON tables.[object_id] = index_columns.[object_id]
AND columns.column_id = index_columns.column_id
INNER JOIN sys.indexes
ON tables.[object_id] = indexes.[object_id]
AND index_columns.index_id = indexes.index_id
WHERE
indexes.is_unique = 1