I know what He thought.
He was without sin, and perfectly legally, in Gods perfect justice, was allowed to offer Himself voluntarily, to take the punishment for our sin, as a living sacrifice, so that we can partake of the free gift of forgiveness, and approach God with confidence, not fear, that our punishment has been paid, and we are washed c!San and acceptable to God.