I need to use the value of a variable as one of my fields in my SQL insert query that I am generating.In PHP I do this:\[code\]if($currency = "USD"){ $columntoinsert = "USD_Currency";} else{ $columntoinsert = "";}\[/code\]Then in my SQL statement I would execute the query like so:\[code\]$sqlinsertpayment = sqlsrv_query($connect,"INSERT INTO Payments_TBL(column1,column2,$columntoinsert,columnn)VALUES(????)",$params) or die("An error occurred trying to execute the statement"); \[/code\]I want to do the same in C#. I have the following code to set the column I want to use\[code\]var amountfield = ""; if (save_currency != "USD") { amountcolumn = "Amount"; } else { amountcolumn = "USD_Amount"; }\[/code\]But I can't execute my sql query in since trying to use \[code\]amountcolumn\[/code\] in the query string generates an \[code\]Invalid column name\[/code\] error which is expected. How can I use the variable in this manner: \[code\]var sql = new sqlCommand("INSERT INTO Payments_TBL(column1,column2,myc#variablevaluehere,column3,....)Values(@value,@value,@value)",new sqlConnection(conn)); \[/code\]Open to other alternatives. All help will be appreciated.