Presumably, this is a big part of why Bush was so keen to relabel what had previously been considered civilian terrorists as military combatants, since the fifth amendment then apparently stops applying.
IANAL, but the way I understand it is something like: You are a court, and you're trying to determine how the 5th amendment applies in some tricky case. The text itself might be ambiguous or unspecific in your case.
One way to approach that ambiguity is to look at the history of the amendment - why was it written, and given that, what is the most likely intended way to read it?
For the 5th amendment, the context is that the Court of Star Chamber used the inquisitive method, combining the search for truth with the force a court is able to apply to a defendant. In doing so, the Court of Star Chamber highlighted a flaw in the inquisitive method: Combining the right to apply force to its subjects with the job of determining truth created incentive for extensive abuse, as the court forced false testimonies out of its subjects.
Hence, the 5th amendments no-self-incrimination clause can be interpreted to exist to weaken the inquisitorial method in US courts, reinforcing the US commitment to an adversarial system instead.
However, the 5th amendment applies there as well - they can't force you to self-incriminate, you are free to remain silent in police interrogation. However, there's nothing in the 5th amendment saying the police or courts can't ask clever questions - if you incriminate yourself because a police asked a sneaky question in interrogation, that's on you.
Sneaky questions versus outright lying? From what I've read, that's common practice for US police officers in suspect interviews.