Jesus’ crucifixion (the worst evil ever committed) resulted in salvation for those who believe on Him.
Pharaoh of Egypt ordered all Jewish male children should be killed. Moses was rescued by the same Pharaoh’s daughter and she brought up Moses as her son. God completely overturned Pharaoh’s wicked idea and raised up Moses in the same Egyptian kingdom. He was provided with the education and military skills which came handy while leading the large number of Jewish people, when God brought the Jews out of Egypt.
Joseph was sold as a slave by his brothers at a young age. He was bought to Egypt and God arranged the circumstances which led him to rise as the governor. The same Joseph could see how God brought out good of the evil which he had to face.
18 And his brethren also went and fell down before his face; and they said, Behold, we be thy servants.
19 And Joseph said unto them, Fear not: for am I in the place of God?
20 But as for you, ye thought evil against me; but God meant it unto good, to bring to pass, as it is this day, to save much people alive.
21 Now therefore fear ye not: I will nourish you, and your little ones. And he comforted them, and spake kindly unto them.
God is Sovereign. Nothing can come to us unless God permits. And God’s promise is
28 all things work together for good to them that love God, to them who are the called according to his purpose.