If you are charged as an accessory after the fact, you cannot be forced to testify against yourself. Since testifying against an individual that you are accused of aiding would constitute testifying against yourself, you probably can’t be compelled to testify. This is why prosecutors often use the charge to leverage your testimony but will drop the charges if you do testify.