This query returns all ids in the customer table for which the corresponding XML document in the column customerXML has an element named customer whose Name child element has the value "John Hancock".
SELECT customerID FROM customer WHERE customerXML.EXISTSNODE('/Customer[Name="John Hancock"]', '') = 1;
Query result:
customerID ----------- 1