What's the worst/maximum sentence or sanction one can receive for remaining silent in court when asked to speak by a court official (with and without a subpoena)?
Theoretically, life imprisonment. One can be imprisoned for as long as you remain in contempt of court, so if a person is ordered to testify and refuses, he can be held in prison until he testifies. In the US, this has been tested up to 14 years, whereupon a judge decided that the individual would perennially remain in prison rather than comply with the order, so there was no point in further imprisonment. However, invoking the right to silence is typically related to testimony at a trial, and trials don't last a lifetime. When compliance with the order becomes moot, a contemptuous person will not be held any longer, at least if this is a civil contempt case. Criminal sanctions are also possible for contempt, in which case there is a specific period of incarceration as punishment.