Added select for index

Need to end select when EQ, LT, LE conditions are not met