I remember early in my miltary training, we had a lesson about what to do if we ever found ourselves in the hands of an enemy.
"Your first duty is to stay alive. Do what you have to, to stay alive."
There are limits, of course - there may be information you can't reveal because the consequences would be too high. But those are exceptional circumstances.
As a Catholic I believe that denouncing Christ would be an exceptional circumstance for ME. Of course it's easy to say when I've not been in that kind of situation, but I pray that the Holy Spirit would be with me.