The question reads: From the given pattern, What comes in place of '?'
The answer is
It looks like:
0. Triangle from 4 figures rotates in the square anti-clockwise.
1. "S" goes around anti-clockwise, from one corner to another corner.
2. "Square" goes along main diagonal (from TopLeft to BottomRight and back).
3. "Triangle" goes along second diagonal (from TopRight to BottomLeft and back).
4. Other figures appear to chosen randomly. May be there is some pattern I do not see, but it doesn't matter, since 2 and 4 leaves us with only one possible answer, which perfectly agrees with all 5 patterns.
I also answer (4) but I'd like to define the reason in another way.
It appears to be a control structure in the patter, formed by: a 'triangle', a 'square' and a 'S'.
This 3 signs form a triangle where:
Figure number (4) is the only one validated by this pattern. (1) and (3) don't show a 'S' and in particular the (1)'s 'triangle' is not where it were supposed to be. (2) shows two 'squares' and no 'triangle', quite strange.