If you have received a subpoena to testify, you must appear at court. No one can make you say anything, but there are potential consequences if you do not speak, to include a possible contempt of court finding and jail. If you are concerned about this, sit down with a criminal defense attorney in your area to discuss all of your rights.
In no way am I offering you legal advice, and in no way has my comment created an attorney-client relationship. You are not to rely upon my note above in any way, but insted need to sit down with counsel and share all relevant facts before receiving fully-informed legal advice. If you want to be completely sure of your rights, you must sit down with an experienced criminal defense attorney to be fully aware of your rights.
If you are subpoenaed by being personally served with the subpoena, you must appear and testify truthfully at the court hearing. You do not have a privilege to assert that would allow you to avoid testifying. I would consult an attorney in your area to go after the facts of the case to get more specific advice.
The information provided in this answer does not create an attorney-client relationship. If you are interested in his legal services, feel free to call Chris at (303) 409-7635 at his law office in the Denver Tech Center. All initial consultations are free of charge.
If you are subpenaed, you need to check with an atty before you testify. You do not want to say anything that can incriminate yourself. Other than your own costitutional right not to incriminate yourself, you pretty much have to answer questions from both sides. usually at prelim, the court just wants to know if there likely was a crime committed and some evidence tht the deft did it. The standard isnt usually high like at trial (beyond a reasonable doubt). This is a low standard and just a device that occasionally is successful at getting a weak case thrown out early. Talk to a criminal law atty in your state for specifics.
You can also contact the lawyer who subpeonaed you. The subpeona should state whether it is from the defense or the prosecution, and their contact information. You can call them and ask why you are being asked to testify.