It depends on the Switch, whether it support 1Gbit, 2.5Gbit or even 10Gbit.
Cat5 is 20 year old standard, more commonly used in newer variant 5e, which then supports even 10Gbit up to certain distance if the cable is good quality.
Cat6 and Cat6A are guaranteed to hit 10Gbit up to 60 meters, considering good cable quality.
Since you write "modem" and not Switch, I presume you use Router and those are always only 1Gbit for most part, and for 3 meters, the kind of cable shouldn't matter much.