If there is no domestic violence, then it sounds like this would be an order (injunction) under the Protection From Harassment Act 1997 in a civil court (as opposed to a family court or a criminal court).
There is no reason why a civil court couldn't impose special measures as well - although there is no statutory structure as there is in criminal cases - but your lawyer would need to persuade the court that it was necessary in the interests of justice.
So you being so scared of the defendant that if you saw them you felt your evidence would be compromised would probably do, but just not wanting to see them because you don't like them and they are harassing you probably wouldn't.
You need to discuss it with your lawyer.
It will depend on the nature of the harassment and what is at issue.
For example, if you had harassment by email and you had all the copies of the emails and the person didn't dispute they'd sent them, it's unlikely you'd need to give evidence. If the harassment was they assaulted you and they denied it, you would need to as they have a right to test your evidence in cross examination.
No one here can give you legal advice or tell you what the court would do other than in very general terms. As I've said, make sure you tell your solicitor you don't want any contact with this person at court and discuss options with them.