It is best to listen to your body and give it the rest it needs when you're sick. If you have mild symptoms such as a runny nose or a sore throat, light to moderate exercise may be possible and could even provide some relief. However, if you have symptoms such as fever, body aches, chest congestion, or fatigue, it's generally best to avoid exercise until you've recovered.
Exercising vigorously when you're ill can potentially make your symptoms worse and prolong your recovery time. It can also put additional stress on your immune system, which is already working to fight off the illness. But if you feel exercise will help you in the long run discuss it with a health practitioner to recommend the best exercise for you.