IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name="MyTableIndex" AND object_id = OBJECT_ID('tablename'))
BEGIN
-- Index with this name, on this table does NOT exist
END
IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name="MyTableIndex" AND object_id = OBJECT_ID('tablename'))
BEGIN
-- Index with this name, on this table does NOT exist
END