You're looking for the operator "iswm" (stands for "is wildmatch").
Please type: /help if then else, in mIRC. Browse through the list, under "The Operators."

Code:
if (John* iswm $nick) { }


It may be better to use this persons hostmask or address instead of using his nick.

Such as:

Code:
if (*!*ident@*.some.host.com iswm $fulladdress) { }