I am using SQL Server 2012. I have the following code
DECLARE @p varchar(4)
SET @p = ext1
DECLARE @x xml
SET @x = '<labels defaultText = "Some text 2012">
<label text = "Some text1" />
<label text = "Some text2" />
<label text = "Some text3" />
</labels>'
Please, help to write an xpath/xquery query to check whether defaultText value or one of the texts' values contain @p or not. In this example the result will be true , because value of the text in the first label contains ext1.