Alternative to "FOR JSON" in SQL Server 2012?
No. JSON support was new in SQL Server 2016.

If you want to convert data to JSON, you have a few options:


Fetch the rows as you would any other query result, and convert it in the application tier (like C#, Java, etc)
Build T-SQL logic in a stored procedure or function to convert it to JSON yourself (but keep in mind that you won't be able to use "FOR JSON PATH" the exact same way 2016 does)
Build CLR logic to do it (again, won't be compatible with "FOR JSON PATH")