How to select Radio button option by using conditions?