Some hints. Since you have that E^I a x term, you only get a real result for a == 0.

Plot the integrand, do numerical integration and compare with expection. It differs.

For q == 0 and a == 0 , you get the expected result, numerical and analytical.

    Manipulate[{Plot[
      Evaluate@
    Through[{Re, 
       Im}[-E^(I a x) Log[1/2 Sqrt[(q x (1 - x) + m) b]]]], {x, 0, 1},
    PlotStyle -> {Blue, Red}, ImageSize -> 400], 
      NIntegrate[-E^(I a x) Log[1/2 Sqrt[(q x (1 - x) + m) b]], {x, 0, 
    1}], 1./2 Log[4/(m b)]}, {{a, 1}, 0, 4}, {{b, 1}, 0, 5}, {{m, 1}, 
    0, 4}, {{q, 1}, 0, 5}]