Lying under oath is a serious offense and can land you in prison for 5 years minimum.
Lying under Oath is a felony in many states and is known as Perjury and can carry some serious prison time if caught.
It's always best to tell the truth everywhere especially in court.