Your sample output doesn't match your stated requirements. By your own sample data, your output for all "NOK" in the second field should be:
AND NOK
AND NOK
MAD NOK
MAD NOK
MAD NOK
So, if this is truly the out put you desire...
root@linux:~# cat sort.txt | awk '$2 == "NOK"'
AND NOK
AND NOK...