AFAIK You have a right to remain silent during your arrest and before you face a judge.
If court orders you to do something (legal ofc) you will have to do it, if they ask you a question - you will have to answer it. Except something that would incriminate you or your immediate relatives.