How to select drop-down fields by using conditions?