Try
$this->db->select('course_name AS `Course Name`, course_desc AS `Course Description`, display_public AS `Display Status`', FALSE);
This is the space in your pseudonym that is messing with you.
UPDATE
I'm not sure why you want, but I donβt see anything that prevents you from writing
$this->db->select("course_name AS `{$variable}`", FALSE);
(for simplicity, only one field is shown)
UPDATE 2
There should be a standard string conversion, so I donβt know why this does not work for you .. always split the lines ...
$this->db->select('course_name AS `' . $variable . '`', FALSE);
source share