No, you're typically required to answer questions truthfully when testifying. However, if your answer could incriminate you, you can invoke your Fifth Amendment right.