How do I return an index for each nvarchar col in a table? Imagine a simple table as follows

Create table test ( c1 nvarchar(10), c2 nvarchar(10), i1 int, c3 nvarchar(10) );


Is there a way I can query and get The index for the nvarchar columns?

The index would be 0 for c1 and 1 for c2 and 3 for c3 or if it is 1 and 2 and 4 respectively that is also ok
Check out the INFORMATION_SCHEMA. I guess something like:

SELECT COLUMN_NAME, ORDINAL_POSITION
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = ...
  AND TABLE_NAME = ...
  AND DATA_TYPE IN (...)