XML queries with case insensitive tag- which is the best query I had asked question about XML queries with case insensitive tag earlier and i found a solution too. But i also found some other solution.
So table was something like

DECLARE @myTable TABLE ( yourXML XML )  

INSERT INTO @myTable SELECT '&lt;z&gt;&lt;a&gt;&lt;b&gt;1&lt;/b&gt;&lt;c&gt;2&lt;/c&gt;&lt;/a&gt;&lt;/z&gt;'
INSERT INTO @myTable SELECT '&lt;Z&gt;&lt;A&gt;&lt;b&gt;1&lt;/b&gt;&lt;c&gt;2&lt;/c&gt;&lt;/A&gt;&lt;/Z&gt;' 


And all the below solutions return what i wanted(case insensitive tag)

-----Solution 1----------

SELECT * FROM @myTable WHERE ( [yourXML].exist('for $x in /*[lower-case(local-name(.)) = "z"]/*[lower-case(local-name(.)) = "a"] where  ( ($x/*[lower-case(local-name(.)) = "b"][1]) = 1 )  return $x')&gt;0 ) 

-------------------------
-----Solution 2----------

SELECT * FROM @myTable
WHERE
(CONVERT(XML,LOWER(CONVERT(VARCHAR(MAX),[yourXML]))).exist('for $x in /z/a where  ( ($x/b[1]) = 1 )  return $x')&gt;0 )

-------------------------
-----Solution 3----------

SELECT * FROM @myTable WHERE 
([yourXML].exist('for $x in (/Z/A,/z/a) where  ( ($x/b[1],$x/B[1]) = 1 )  return $x') &gt; 0 ) 
-------------------------


Now i want to know which one is better to use by considering its all X-query commands(support for value(),exist(),count(),query() etc), Performance,Efficiency etc.
You can easily test the performance yourself.

Create a regular table that you can test your queries on.

create table myTable ( yourXML XML )  


Add a couple of rows that will give you a match.

INSERT INTO myTable SELECT '&lt;z&gt;&lt;a&gt;&lt;b&gt;1&lt;/b&gt;&lt;c&gt;2&lt;/c&gt;&lt;/a&gt;&lt;/z&gt;'
INSERT INTO myTable SELECT '&lt;Z&gt;&lt;A&gt;&lt;b&gt;1&lt;/b&gt;&lt;c&gt;2&lt;/c&gt;&lt;/A&gt;&lt;/Z&gt;' 
INSERT INTO myTable SELECT '&lt;Z&gt;&lt;A&gt;&lt;B&gt;1&lt;/B&gt;&lt;c&gt;2&lt;/c&gt;&lt;/A&gt;&lt;/Z&gt;' 


Add a whole bunch of rows that will not match in different parts of the XML.

insert into myTable 
select top(10000) '&lt;X&gt;&lt;A&gt;&lt;B&gt;1&lt;/B&gt;&lt;c&gt;2&lt;/c&gt;&lt;/A&gt;&lt;/X&gt;'
from sys.all_objects as o1, sys.all_objects as o2

insert into myTable 
select top(10000) '&lt;Z&gt;&lt;X&gt;&lt;B&gt;1&lt;/B&gt;&lt;c&gt;2&lt;/c&gt;&lt;/X&gt;&lt;/Z&gt;'
from sys.all_objects as o1, sys.all_objects as o2

insert into myTable 
select top(10000) '&lt;Z&gt;&lt;A&gt;&lt;X&gt;1&lt;/X&gt;&lt;c&gt;2&lt;/c&gt;&lt;/A&gt;&lt;/Z&gt;'
from sys.all_objects as o1, sys.all_objects as o2


Use SET STATISTICS IO (Transact-SQL) and SET STATISTICS TIME (Transact-SQL) and execute your queries in SQL Server Management Studio.

set statistics time on
set statistics io on

-----Solution 1----------

SELECT * FROM myTable WHERE ( [yourXML].exist('for $x in /*[lower-case(local-name(.)) = "z"]/*[lower-case(local-name(.)) = "a"] where  ( ($x/*[lower-case(local-name(.)) = "b"][1]) = 1 )  return $x')&gt;0 ) 

-------------------------
-----Solution 2----------

SELECT * FROM myTable
WHERE
(CONVERT(XML,LOWER(CONVERT(VARCHAR(MAX),[yourXML]))).exist('for $x in /z/a where  ( ($x/b[1]) = 1 )  return $x')&gt;0 )

-------------------------
-----Solution 3----------

SELECT * FROM myTable WHERE 
([yourXML].exist('for $x in (/Z/A,/z/a) where  ( ($x/b[1],$x/B[1]) = 1 )  return $x') &gt; 0 ) 

-------------------------
-----Solution 4----------

select *
from myTable
where yourXML.exist('(Z/A,z/a)[(b,B)=1]') = 1


Switch to the message tab and evaluate execution time and required reads.

Presumably you have better data in your database to test on. The performance characteristic will change depending on the actual structure of the XML you have to deal with in the real world.

A side note is that your queries are not equivalent.
The first is easily adapted to longer element names.
The second query changes the content of the elements, not just the element names.
The third query does not really deal with case insensitive element names, it just enumerate all possible element names that in this case happens to be different in cases only. If you wanted to deal with lets say a 3 letter element name with your third solution you would have 8 (I think) different permutations to deal with.

I added a fourth solution,  mostly because it is short and pretty, that has the same limitations as your third solution. It is in my measurements slightly faster than using FLWOR.