First, you need and install SqlToTxt.
SqlToTxt is a tool to export Sql Server query results to CSV file.
Using SqlToTxt you can export Sql Server query results easily and fast.
Export Sql Server Query Results To CSV File – 2 steps
1. Click “Export From Query” button.
2. Config and export.
More about SqlToTxt – the tool to export SQL Server query result