declare  cursor1 cursor for select name from sysobjects where xtype='u' and name like '%12'
declare
@i varchar(1000)
open cursor1
fetch cursor1 into @i
while @@fetch_status=0
begin
  exec('drop table '+@i)
  fetch cursor1 into @i
end
close cursor1
deallocate cursor1