The answer is
5
But what is the explanation?
Source: https://www.funwithpuzzles.com/
The answer is
5
because
the sequence is the first nine digits of pi - 3.14159265(35...) - written left to right, top to bottom. The colours of the boxes are red herrings.
5. The columns sum to $6,12,18$.
Another answer may be found with modular arithmetic.
First row are the sum of columns below mod 10 (or, in a decimal system, the rightmost digit). Though I'm more inclined to the pi digits answer, this one does not require prior knowledge of pi digits but some simple pattern recognition.
1st col: (2 + 1) mod 10 = 3
2nd col: (5 + 6) mod 10 = 1 (since 11 mod 10 = 1)
3rd col: (x + 9) mod 10 = 4 -> x mod 10 = 5 -> x = 5 is the smallest answer.
Downside is that this explanation accepts infinite answers, so long as they hold mod 10 = 5: 5, 15, 25, 124895701235, etc, but it is reasonable to assume that most people will settle on 5, if anything, considering every other number is smaller than 10 (say, they are themselves the result of mod 10).