Escape XML special characters in SQL Server Query

Here I am trying to how to work with special character in a SQL Server. Result of query (include type keyword) Result of query (without type keyword) Result of above 3 query Other Refrence