This is almost word for word at times in Matthew, chapter 26:64. In Luke, chapter 22:67-70, there is something similar, but there is nothing like this in John, chapter 18. Mark said that Jesus replied to the high priest (ὁ δὲ Ἰησοῦς εἶπεν), pure and simple in the first person singular “I am (Ἐγώ εἰμι).” He was the Messiah Christ and the Son of the Blessed One. There was no ambiguity as in Matthew, “because you have said so”. This answer is direct and unambiguous. There was no more Messianic secret. Then Jesus told him that he would see the Son of Man (καὶ ὄψεσθε τὸν Υἱὸν τοῦ ἀνθρώπου) seated at the right hand of the Power, Yahweh, or God, the Father (ἐκ δεξιῶν καθήμενον τῆς δυνάμεως). He would come on or with the clouds of heaven (καὶ ἐρχόμενον μετὰ τῶν νεφελῶν τοῦ οὐρανοῦ). Jesus gave a strong theological response that the end times were near when the Son of Man, himself, would appear with the heavenly clouds. Jesus was and is the Christ Messiah, case closed.
This is almost word for word in Matthew, chapter 26:63. In Luke, chapter 22:66-70, there was something similar. However, there was nothing like this in John, chapter 18:19, where there was a discussion of the high priest with Jesus, but more about his teachings. Mark said that Jesus was originally silent (ὁ δὲ ἐσιώπα). He did not answer the high priest (καὶ οὐκ ἀπεκρίνατο οὐδέν). Then the high priest again asked Jesus directly (πάλιν ὁ ἀρχιερεὺς ἐπηρώτα αὐτὸν). Was he the Messiah Christ (καὶ λέγει αὐτῷ Σὺ εἶ ὁ Χριστὸς)? Was he the Son of the Blessed One (ὁ Υἱὸς τοῦ Εὐλογητοῦ)? Matthew had said that the high priest Caiaphas was going to put him under oath according to the living God. Jesus was to tell everyone there whether he was the Christ, the Messiah, the Son of God. Luke indicated that they asked Jesus whether he was the Messiah Christ or the Son of God. Thus, this was a clear question about the divine claims of Jesus, particularly his messianic Christ role and his relationship to God the Father.