You'd have to do something of the sort
DECLARE @document varchar(max);
SELECT @document = '<Header><Header><Username>testeyyytttyyyyyy</Username><chave>ef4dbf9f4b6c80fe03671cc476b29636</chave></Header></Header>';
DECLARE @tabela TABLE
(
id int,
xml nvarchar(max)
)
INSERT INTO @tabela VALUES (1, @document);
SELECT @document = '<Header><Header><Username>testeyyytttyyyyyy</Username><chave>ef4dbf9f4b6c80fe03671cc476b29637</chave></Header></Header>';
INSERT INTO @tabela VALUES (1, @document);
SELECT @document = '<Header><Header><Username>testeyyytttyyyyyy</Username><chave>ef4dbf9f4b6c80fe03671cc476b29638</chave></Header></Header>';
INSERT INTO @tabela VALUES (1, @document);
SELECT * FROM @tabela AS t
WHERE 'ef4dbf9f4b6c80fe03671cc476b29636' =
(SELECT SUBSTRING(t.xml, (select PATINDEX('%<chave>%', t.xml) + len('<chave>')), 32))
Note that in WHERE I'm passing a key to be located in your xml ef4dbf9f4b6c80fe03671cc476b29636
You need to find it inside your xml so that you can filter it later.
(SELECT SUBSTRING(t.xml, (select PATINDEX('%<chave>%', t.xml) + len('<chave>')), 32))
I am using SUBSTRING which receives 3 parameters the first is its xml field from its table the second the initial index, ie what I had after <chave>
the third parameter and the size of the string you want, here I'm assuming you have a string always the length of 32 characters, if it is different see how to search for the final index.