Ezekiel 14:18

Though these three men were in it, as I live, saith the Lord God, they shall deliver neither sons nor daughters, but they only shall be delivered themselves.

Cross-reference

Ezekiel 14:14 makes the same point about Noah, Daniel, and Job saving only themselves during famine — here it's repeated for the sword judgment.

Ezekiel 14:16 applies the same principle to wild beasts — the righteous men save only themselves — mirroring this verse on the sword.