There is no dynamic path capability in SQL Server XML. Your options are
Split the path into separate components, such as:
declare @xml xml;
declare @Node1 sysname = N'Record', @Node2 sysname = N'A', @Node1Number int = 2;
set @xml = '<body>
<Record>
<A>a</A>
<B>b</B>
<C>c</C>
</Record>
<Record>
<A>d</A>
<B>e</B>
<C>f</C>
</Record>
<Record>
<A>g</A>
<B>h</B>
<C>i</C>
</Record>
</body>';
select @xml.value('(/body/
*[local-name() = sql:variable("@Node1") and position() = sql:variable("@Node1Number")]/
*[local-name() = sql:variable("@Node2")]/
text())[1]', 'nvarchar(50)');
However, if your path comes as a whole string and you don't want to write a parser, the only option is a dynamic SQL:
declare @Path nvarchar(max) = N'/body/Record[2]/A', @Sql nvarchar(max);
set @Sql = N'select t.c.value(''./text()[1]'', ''nvarchar(50)'') from @xml.nodes('
+ quotename(@Path, '''')
+ ') t(c);'
exec sys.sp_executesql @Sql, N'@xml xml', @xml = @xml;
Personally, I don't like either of them, and would recommend to rethink the whole task. Chances are, there is a better solution than dynamically querying XML on the database side.