
SELECT top(1) 
        cast(1 as bit)
  FROM  sys.indexes AS i WITH (NOLOCK)
  JOIN  sys.tables  AS t WITH (NOLOCK)    ON i.[object_id] = t.[object_id]
 where 
        t.[name]   = @TableName
    and i.[name]   = @IndexName               
    /* and i.index_id > 1 -- nonclustered */
