If it was commuting to work, then I wouldn't. didn't see the need to spread the germs (and I worked in boarding school so it would not be appreciated)...
Otherwise, I usually just take it more easily and if the air is cold as well, use a buff to cover mouth and nose. I'm used to feeling SOB being a moderately severe asthmatic, so that tends to control my cycling when ill more than the illness itself. But at the end I usually feel much better for the cycling than for not cycling, but and this is the big BUT, you should listen to your body. If you feel knackered after the ride, don't repeat, if you feel better for it, then fine.