Please follow the python syntax-Just check if hike
is in the Name
. Below should work
def FindLabel ([Name]):
if 'hike' in [Name]:
return [Name]
But if you need to label only Name
does not contain hike
use below-
def FindLabel ([Name]):
if 'hike' not in [Name]:
return [Name]
'LIKE'
is an SQL operator that may be used with wildcards e.g. asterisk, percent sign etc but here you need to use pure python!
For more on arcmap label expression please consult arcmap documentation e.g.here.
Edit:
If you want to use SQL and avoid python expression then use Maplex Label Manger ,most efficient labeling system for arcmap sofar, as below-

If you want more label class and each class with different properties (SQL query and label style) then you can and class as you want as below-
For more on SQL expression use ESRI documentation e.g.here.
Or use the answer provided by @Midavalo if want to use classic labeling.