Alan B and mike-from-spain are both partly right and partly wrong. It is very difficult to dismiss someone due to ill-health, but the answer is yes, it can be done, even if you are covered by a sick note.
The employer would have to show that your ill-health was such that you could not do your job as required. To protect themselves against an unfair dismissal claim, they would also need to "go the extra mile" by taking all reasonable steps to help you manage your medical condition, find out the extent of your illness (this could include obtaining copies of your medical records), offer alternative work if appropriate and generally support you. If, after all this, you are still not capable of doing your job due to your medical condition, this would qualify as a fair reason for dismissal under the head of capability (s98(2)(a) Employment Rights Act 1996).
Alternatively, if your employer believes your condition is not genuine - that is, they think you have lied to them about being ill - this would also be a fair reason for dismissal under the head of conduct (s98(2)(b)). Here the employer will need some evidence: for example they may ask you to undergo a medical examination to detemine whether you are genuinely ill. They could not force you to undergo such an examination, but you are unlikely to have a case against them for unfair dismissal if you refuse without a good reason.
I should add that as well as knowing the theory of this from my legal studies, in my previous career as a manager I have also seen someone dismissed in this way in "real life", so I know it can be done! It took nearly a year of meetings, investigations, offers of alternative employment etc though...
graduate diploma in law / LPC graduate
studying for masters degree in law (employment law specialist)