This might help you:
https://msdn.microsoft.com/library/bb500156.aspx
The following query includes columns of xml type. The query retrieves product model ID, name, and manufacturing steps at the first location from the Instructions column of the xml type.
Example
USE AdventureWorks2012;
GO
SELECT ProductModelID, Name,
Instructions.query('
declare namespace MI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
/MI:root/MI:Location[1]/MI:step
')
FROM Production.ProductModel
FOR XML RAW ('ProductModelData')
GO
The following is the result. Note that the table stores manufacturing instructions for only some product models. The manufacturing steps are returned as subelements of the <ProductModelData> element in the result.
<ProductModelData ProductModelID="5" Name="HL Mountain Frame" />
<ProductModelData ProductModelID="6" Name="HL Road Frame" />
<ProductModelData ProductModelID="7" Name="HL Touring Frame">
<MI:step> ... </MI:step>
<MI:step> ... </MI:step>
</ProductModelData>
If the query specifies a column name for the XML returned by the XQuery, as specified in the following SELECT statement, the manufacturing steps are wrapped in the element that has the specified name.