Column name's should not contain space in between. Here in your case, the exception is thrown due to space between
Availability Day
column. To prevent this, you can alter the table and put underscore(
Availability_Day
) in place of space or you can try this:
st.executeQuery("select * from doctorinfo where speciality='"+b+"' AND [Availability Day]='"+c+"' ");
--Amit