I'd go with Tony's suggestion but just in the interests of learning......

Your original formula will work OK with ORs, i.e.

=IF(OR(G2={"Jan","Feb","Mar"}),1,IF(OR(G2={"Apr","May","Jun"}),2,IF(OR(G2={"Jul","Aug","Sep"}),3,4)))