(CASE WHEN CHARINDEX('오후',date(컬럼명))>0 THEN DATEADD(HOUR,12,CONVERT DATETIME,REPLACE(date(컬럼명),'오후','')))
WHEN CHARINDEX('오전', date(컬럼명))>0 THEN CONVERT(DATETIME,REPLACE(date(컬럼명),'오전','')) END) >= convert(datetime, '2011-06-01 오후 15:00:00')
AND (CASE WHEN CHARINDEX('오후', date(컬럼명))>0 THEN DATEADD(HOUR,12,CONVERT(DATETIME,REPLACE(date(컬럼명),'오후','')))
WHEN CHARINDEX('오전', date(컬럼명))>0 THEN CONVERT(DATETIME,REPLACE(date(컬럼명),'오전','')) END) <= convert(datetime, '2011-06-01 오후 18:00:00')