Invece di testo hardcoded - brazil_flag
, scrivi il nome prelevato da db. Come,
int imageid = context.getResources().getIdentifier(itemdetail.getFlag1(), "drawable", context.getPackageName());
ImageView imagenow = (ImageView) convertView.findViewById(R.id.imageView1);
imagenow.setImageResource(imageid);