The best thing you can do for your baby when you're sick is to continue to breastfeed.
When you have a contagious illness such as a cold, flu, or other mild virus, your baby was exposed to the illness before you even knew you were sick. Your milk will not transmit your illness to baby, but it does have antibodies in it that are specific to your illness (plus anything else you or baby have been exposed to) - they'll help prevent baby from getting sick, or if he does get sick, he'll probably not be as sick as you.
Withholding your breastmilk during an illness increases the possibility that baby will get sick, and deprives baby of the comfort and superior nutrition of nursing.
You can also take measures to prevent baby from getting sick by doing the usual things to prevent the spread of illness: washing hands often, avoid sneezing/coughing on baby, limiting face-to-face contact, etc .Many times moms don't nurse frequently enough and don't get enough fluids to keep the milk supply going. Sometimes medications can cause your milk supply to diminish, as well. To avoid a decreased milk supply, drink plenty of fluids to avoid dehydration, continue to nurse often and avoid/limit medications (like antihistamines) that tend to decrease milk supply.