You will not be able to change the name of the column by SqlCommand
, since the parameters only serve to add values.
You will have to do this before creating the command by changing the original SQL:
var valorTipo = "valor do tipo";
var nomeDaColuna = "NomeColuna";
var sql = string.Format(@"
SELECT IDLayout, Nome, {0}, TipoProduto
FROM ProdutoLayout
WHERE (TipoProduto = @tipo) AND ({0} = 1)
", nomeDaColuna);
var command = new SqlCommand(sql);
command.Parameters.AddWithValue("@tipo", valorTipo);
I hope the name of this column comes from a trusted source, as this will be a SQLInjection point and it will have to be handled if it is the case.