Response Assertion
Lets see how to add an assertion, go to your Thread Group, in my case it is Users. Right click your Thread Group,go to Assertions and click on Response Assertions.
You can apply an assertion to the Main sample and sub samples, Main sample only,Sub-samples only or apply to Jmeter variable.
The next field in the Response Assertion window is the Field to Test. In my case I have clicked Response Code as the field to test my response. Also you can test Text Response, Document (text),URL sampled and so on.
I want to check whether the response code is Equals 200, so for that we can write the code in the Patterns to Test text box. This assertion will check the response code and compare with 200, if this matches it will pass the test case or if not it fail.