When you are off sick, you continue to build up your entitlement to paid holiday, which you can take when you go back to work.
It can be a good idea to use this holiday as part of a planned gradual return to work after a long period of sickness absence.
Alternatively, you can choose to take holiday instead of sick leave while you are off sick. You should notify your employer of your plan to do this. Taking paid holiday might be sensible if, for example, you have used up your entitlement to occupational sick pay at full pay.
This is a complicated issue and you may want to ask your union rep for help if you have one. Make sure you keep a good record, for example of any requests you make to take holiday while off sick.