Debe usar sql:variable("@LanguagePath1") en lugar de solo @LanguagePath1 . Obtenga más información al respecto aquí
. Aunque no estoy seguro de si xpath dinámico funcionará :) Sin embargo, algo como xmltest.value('(/languages/language[@id=sql:variable("@languageCode")])[1] debería funcionar.