1. ORACLE

create table test
( c1 char(10)
, c2 varchar(10)
)

insert into test values('abc', 'abc')

select '['||c1||']', '['||c2||']' from test where c1 = 'abc';   -- true
select '['||c1||']', '['||c2||']' from test where c2 = 'abc';   -- true
select '['||c1||']', '['||c2||']' from test where c1 = c2;      -- false

 

2. MSSQL

create table test
( c1 char(10)
, c2 varchar(10)
)

insert into test values('abc', 'abc')

select '['+c1+']', '['+c2+']' from test where c1 = 'abc';   -- true
select '['+c1+']', '['+c2+']' from test where c2 = 'abc';   -- true
select '['+c1+']', '['+c2+']' from test where c1 = c2;      -- true