The answer is that they should not! The Bible is very clear on this point: "But above all, my brethren, do not swear, either by heaven or by earth or with any other oath. But let your 'Yes' be 'Yes,' and your 'No,' 'No,' lest you fall into judgment" (James 5:12).
Jesus Himself said, "But I say to you, do not swear at all: neither by heaven, for it is God's throne; nor by the earth, for it is His footstool; nor by Jerusalem, for it is the city of the great King. Nor shall you swear by your head, because you cannot make one hair white or black. But let your 'Yes' be 'Yes,' and your 'No,' 'No.' For whatever is more than these is from the evil one" (Matthew 5:34-37).
This scriptural instruction is not meant to imply that oaths by themselves are sin. To emphasize that we mortal human beings are often powerless to fulfill even our strongest intentions, God commands us not to swear by His name in any oath. Failing to fulfill an oath would be taking God's name in vain, breaking the third commandment (Exodus 20:7).
Therefore, a Christian should simply say "Yes" or "No," according to what one honestly believes to be true, even in legal matters. Truly, this should be a sufficient guarantee of honesty from any man. What a shame men must swear an oath to be truthful!
The law of the United States permits affirmation, that is, saying "Yes" or "No"—without raising the hand to swear.