I think that it varies by state and some even make it optional. You could always just end it by saying so help me "insert your name" instead of so help me god or say on my honor instead. One could call the court where they will be testifying and explain their non religious beliefs. I'm sure they would be accommodating.
When someone gives a sworn testimony and the statement is made....do you swear to tell the whole truth and nothing but the truth so help you God....what if the person giving the statement doesn't believe on God?
Don't catch them on a technical. It is something the United States was built on. You know they are asking you to tell the truth period. I hope your personal religious status is not what is in question. A crime has been committed. You are there to help solve the crime not become righteous on your personal assessment to the God issue.
I heard that in some areas secular people have to swear on the Constitution. Of course some have swore on Darwin's theory of evolution, but swearing on the Constitution seems more practical. Muslims would have to swear on the Koran.
Regardless of a belief in God or not . . You will find those willing to lie will do so without pause or remorse, and definitely to save their own skin. It makes absolutely NO difference in whether they believe in God or not. You forget, the Christian religion is based on Grace . . . Eternal underserving forgiveness . . All one has to do to make amends in this regard is repent on bended knee, before God ONLY.
Even Hitler and many serial killers can get into heaven via "Grace" . . . The Flaw in "God's Justice".