you have to appear before the court as witness and the accused counsel will cross examine you before the court. if you will not appear then the court have power to issue arrest warrant against you.
it will be better to appear before the court, the court will pay your expenses as per law for your appearance.