When you are sick your body needs to focus all it's energy on getting healthy again. And if you decide to workout, even if it is just a simple exercise like for example walking, how efficient will that workout be for you? It's not worth it. You are exercising to become fit and healthy, and working out while being sick will lead to the exact opposite.

If you do not rest properly in between workout days and make sure that you have 2 days off per week, your body will not have time to recover, putting added stress on your central nervous system and that will lower your immune system. Low immune system will make you sensitive to all sorts of illnesses. Working out while being sick will lead to your body getting sicker and for example lead to pneumonia, and in worse cases it could even lead to heart problems like heart murmurs (where a valve stops functioning properly) because of the added stress.
Even people who tend to workout while being just a little sick, will have a constant lowered immune system, making them sick more often and this will have a negative effect on their exercise results because they can never give it their all during their exercise sessions, making it almost impossible to progress and therefore they will not lose the fat weight they want or build desired muscle mass.
As long as you do not stuff your face while being sick, you will not gain fat weight or lose muscle mass. Take time off to recover when you are sick, do not exercise again until you know that you are well enough to do so. Don't risk your health.