How is "Show alerts from my contacts" for Messages in iOS Notification Center supposed to work?
There's 2 different things here which are not pretty clear.

First of all, there's SMS and iMessage.

And like explained on this blog you can restrict iMessages from giving a notification if you decide you want contacts only (since iOS6). This does not work for SMS.

With iOS the name of Show iMessage alerts from changed, but the functionality remained the same.