Use the OR operator:
Select Name, Age from Table1 where
(Class = '1st' and Date between #"+1st_Date.ToString() +"# and #"+2nd_Date.ToString() +"# ) OR
(Class = '2nd' and Date between #"+1st_Date.ToString() +"# and #"+2nd_Date.ToString() +"# ) OR
(Class = '2nd' and Date > #"+1st_Date.ToString()+"# and Date < #"+2nd_Date.ToString()+"#)