Here we see that God has predestined to salvation those whom He foresaw that they would be saved. That is, He knew it beforehand...
--------------------------------------------------
28 Moreover, we know that to those who love God, who are called according to His will, all things work together for good.
29 For whom he foreknew, he also predestined to be like the image of his Son, that he might be the firstborn among many brethren.
30 But those whom He predestined, he called, and those whom He called, He justified; and those whom he justified, he glorified.
31 What can I say to this? If God is for us, who is against us?
(Rom. 8: 28-31)
----------------------
But here we see that the Lord God does not judge by foreknowledge or predestination, but by specific sins and misdeeds.
That is, God can judge against His own prediction and intention about a person
-----------------------------------------------------------------
11 Say to them, "As I live," says the Lord God, " I do not want the death of a sinner, but that the sinner should turn from his way and live." Turn, turn from your evil ways; why should you die, O House of Israel?
12 And you, son of man, speak to the children of thy people: the righteousness of the righteous will not deliver on the day of his crimes, and the wicked for their iniquity shall not fall thereby in the day from his wickedness, and the righteous on the day of his transgression can't stay alive for their righteousness.
13 When I tell the righteous man that he will live, and he trusts in his own righteousness and does unrighteousness, then all his righteous deeds will not be remembered, and he will die of his unrighteousness, which he has done.
14 But when I say to the wrongdoer, 'You will die by death,' and he will turn from his sins and do justice and righteousness,
15 If this wrongdoer returns the pledge, pays for what he has stolen, and walks according to the laws of life, doing nothing evil, he will live, he will not die.
16 None of his sins that he has committed will be remembered to him; he has begun to do justice and righteousness, and he will live.
17 But the children of your people say, 'The way of the LORD is wrong,' while their way is wrong.
18 When a righteous man turns away from his righteousness and begins to commit iniquity, he will die for it.
19 And when the wicked man has turned from his iniquity, and has begun to do justice and righteousness, he will live for it.
20 But you say, ' The way of the Lord is wrong!' I will judge you, House of Israel, every one according to his ways.
(Ezek.33:11-20)
=================================================
What, then, is the outcome of all this? The result is that God has chosen all of us to be saved, but not all of us leave our sins, and therefore many go to perdition, since those who have sinned have a place there by their own actions.